feat(telemetry): emit install events (PILOT-401)#264
Closed
matthew-pilot wants to merge 1 commit into
Closed
Conversation
Add a NewClientFromIdentity convenience constructor to the telemetry package that creates a consent-gated client from a node's Ed25519 identity file on disk. Wire telemetry into the app-store install command: after a successful install (bundle validated, manifest planted, audit logs written), emit an app_installed event carrying app_id, version, and source (catalogue|local). The emission is best-effort and consent-gated — when PILOT_TELEMETRY_URL is empty or identity.json is absent, the client is a hard no-op. Tests cover the new NewClientFromIdentity helper with valid identity, missing identity, loose file permissions, and empty URL (all no-op paths). Closes PILOT-401
83c84c8 to
4c16d7f
Compare
Collaborator
Author
|
Superseded by new PR targeting main directly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Emit a telemetry event on successful app install, gated by consent (no-op when
PILOT_TELEMETRY_URLis empty oridentity.jsonis absent).Changes
pkg/telemetry/client.go— AddedNewClientFromIdentity(url, identityPath string, nodeID int64)convenience constructor that reads the node Ed25519 identity from disk and creates a consent-gated telemetry client.cmd/pilotctl/appstore.go— After a successful install (bundle validated, manifest planted, audit logs written), emit anapp_installedevent with:app_id— the installed app IDversion— the manifest versionsource—catalogueorlocal(from--localflag)pkg/telemetry/client_test.go— Tests forNewClientFromIdentity:Verification
go build ./...— cleango vet ./...— cleango test ./pkg/telemetry/... ./cmd/pilotctl/...— all passingDependencies
This PR builds on PILOT-400 / PR #263 (consent-gated telemetry client). The base is set to that branch so the diff is incremental.
Closes
PILOT-401